package cn.fcq.ymcc.web.controller;

import cn.fcq.ymcc.result.JSONResult;
import cn.fcq.ymcc.service.IVerifyCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/verifycode")// verifycode/sendSmsCode/"+this.formParams.mobile
public class VerifyCodeController {
    @Autowired
    private IVerifyCodeService verifyCodeService;

    /**
     * 发送短信验证码
     * @param mobile 手机号码
     * @return
     */
    @GetMapping("/sendSmsCode/{mobile}")
    public JSONResult smsCode(@PathVariable("mobile") String mobile){
        verifyCodeService.smsCode(mobile);
        return JSONResult.success();

    }

}
